home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94c.txt / 000016_icon-group-sender _Mon Dec 19 14:54:50 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 19 Dec 1994 08:32:31 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: Mon, 19 Dec 1994 14:54:50 GMT
  4. From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
  5. Message-Id: <1994Dec19.145450.20178@kf8nh.wariat.org>
  6. Organization: Brandon's Linux box and AmPR node, Mentor, OH
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <dkuhlmanD0wuqE.I5w@netcom.com>, <3cv0bd$gdv@highway.leidenuniv.nl>
  9. Subject: Re: Backtracking in Icon
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. Also sprach ruiter@ruls41.LeidenUniv.nl (Jan-Peter de Ruiter) (<3cv0bd$gdv@highway.leidenuniv.nl>):
  13. +---------------
  14. | G. David Kuhlman (dkuhlman@netcom.com) wrote:
  15. | : But now, in spite of the fact that I have a language
  16. | : with a strong backtracking mechanism, I find that I
  17. | : don't use it much, except of course, for trivial
  18. | : constructs like:
  19. | :     (checkValid(x) | write("error"))
  20. |     nlines :=  +argument[1] | 10  
  21. | thereby establishing a default value for nlines that can be 
  22. | overwritten by a commandline argument. This is a very natural
  23. | formulation that I use very often in my Icon programs.
  24. +------------->8
  25.  
  26. I think the problem with general use of backtracking is that, while
  27. convenient, it's less efficient than improved algorithms are for any given
  28. task.  (Compare recursive vs. nonrecursive algorithms as another example.)
  29. Nevertheless, when it's needed (no readily available non-backtracking
  30. algorithm available in a timely fashion) backtracking is very useful.
  31.  
  32. ++Brandon
  33. -- 
  34. Brandon S. Allbery KF8NH     [44.70.248.67]        bsa@kf8nh.wariat.org
  35. Linux development:  iBCS2, JNOS, MH                     ~\U
  36. Controlling application developers is like herding cats. --Oracle DBA Manual